
<?php
class Code extends CI_Controller {
	function view() {
		$path_array = array_slice ( $this->uri->segment_array (), 2 );
		$path = urldecode ( implode ( '/', $path_array ) );
		$this->load->view ( 'framework/header' );
		$this->load->view ( 'read/folder', array (
				'path' => $path,
				'navi_array' => $path_array 
		) );
		$this->load->view ( 'framework/footer' );
	}
	function read() {
		$path_array = array_slice ( $this->uri->segment_array (), 2 );
		$file = urldecode ( implode ( '/', $path_array ) );
		$this->load->view ( 'framework/header' );
		$this->load->view ( 'read/code', array (
				'file' => $file,
				'navi_array' => $path_array,
				'file_name' => urldecode ( $path_array [count ( $path_array ) - 1] ) 
		) );
		$this->load->view ( 'framework/footer' );
	}
}

?>